package com.qfedu.microlottery.record.service.impl;

import com.qfedu.common.core.entity.Lotteryrecord;
import com.qfedu.microlottery.record.mapper.LotteryrecordMapper;
import com.qfedu.microlottery.record.service.LotteryrecordService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Classname LotteryrecordServiceImpl
 * @Description TODO
 * @Date 2025-10-09 14:12
 * @Created by 老任与码
 */
@Service
public class LotteryrecordServiceImpl implements LotteryrecordService {
    @Resource
    private LotteryrecordMapper lotteryrecordMapper;

    @Override
    public int totalRecordCount(Integer uid, Integer activityId) {
        return lotteryrecordMapper.todayCount(uid, activityId);
    }

    @Override
    public void addRecord(Lotteryrecord record) {
        lotteryrecordMapper.insert(record);
    }
}
